﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace WpfTreeGridTest
{
    public class IsCurrentLayerConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            if (values.Length == 2 && values[0] is int currentLayer && values[1] is int targetLayer)
            {
                return currentLayer == targetLayer;
            }
            return false;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return new object[targetTypes.Length];
        }
    }
}